<!DOCTYPE html>
@import act.test.Scenario
@import act.test.Interaction
@args List<Scenario> result
<html>
<head>
  <meta charset="utf-8">
  <style>
    body {
      background-color: #222;
      color: #f1f1f1;
      font-family: "Roboto", "Trebuchet MS", "Dejavu Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
      font-size: 1em;
    }
    a {color: #00b8b6;}
    h1,h2,h3,h4,h5 {
      font-family: "Franklin Gothic Medium", "Franklin Gothic", "ITC Franklin Gothic", Arial, sans-serif;
    }
    h4 {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 5px;
      margin-top: 30px;
      border-bottom: 1px dotted #888;
      padding-bottom: 8px;
    }
    #act-version {
      position:fixed;
      bottom:0;
      right:0;
      font-size: 11pt;
      padding: 5px 10px;
    }
    .interactions {
      list-style: none;
      padding-left: 0;
      margin-top: 10px;
      padding-bottom: 10px;
    }
    .PASS {
      color: #00ee00;
    }
    .FAIL {
      color: #ee0000;
    }
    .PENDING {
      color: #ccc;
    }
    .error-message {
      margin-left: 2em;
    }
    .version {
      font-weight: 600;
    }
  </style>
  @render(head)
</head>
<body>
<h1>Test Report</h1>
<div class="version">@(_app.name().capFirst())-@(_app.version().getVersion())</div>
@for(Scenario scenario: result) {
<h4>
@if(scenario.description) {
  @scenario.description
} else {
  @scenario.name.toUpperCase()
}
</h4>


@if(!scenario.status.pass() && null != scenario.errorMessage) {
<div class="@scenario.status">
  [@scenario.status] @scenario.errorMessage
  @if(scenario.cause) {
  <pre>
@scenario.causeStackTrace()
  </pre>
  }
</div>
}

<ul class="interactions">
@for (Interaction interaction: scenario.interactions) {
  <li class="@interaction.status">
    [@interaction.status] @interaction.description.capFirst()
    @if(interaction.errorMessage) {
    <div class="error-message">- @interaction.errorMessage</div>
    @if(interaction.cause) {
<pre>
@interaction.causeStackTrace()
</pre>
    }
    }
  </li>
}
</ul>

}
<a id="act-version" href="https://github.com/actframework/actframework">actframework-@act.Act.VERSION.getVersion()</a>
</body>
</html>